package com.example.neuronview

import android.content.Context
import android.opengl.GLSurfaceView
import android.util.AttributeSet
import android.view.MotionEvent
import androidx.constraintlayout.widget.ConstraintSet

class BaseGLSurfaceView(context: Context,attrs:AttributeSet?=null):GLSurfaceView(context,attrs) {
    private val neuronRenderer: NeuronRenderer = NeuronRenderer(this)
    init {
        
        setEGLContextClientVersion(3)
        setRenderer(neuronRenderer)

    }
    fun getNeuronRenderer(): NeuronRenderer {
        return neuronRenderer
    }


    override fun onTouchEvent(event: MotionEvent): Boolean {
        println(event)
        return neuronRenderer.onTouchEvent(event)
//        return super.onTouchEvent(event)
    }
}